MkDefinitionList
Node for definition lists.¶
Example: Regular¶
Jinja
Python
- something
-
- A definition
- something_else
- Another definition
Example: Nested markdown¶
Jinja
Info
Nested
- something
-
- A definition
- something_else
-
Info
Nested
Name | Children | Inherits |
---|---|---|
MkContainer mknodes.basenodes.mkcontainer A node containing other MkNodes. |
graph TD
93860740301712["mkdefinitionlist.MkDefinitionList"]
93860744077920["mkcontainer.MkContainer"]
93860744073616["mknode.MkNode"]
93860744080896["node.Node"]
140589822947552["builtins.object"]
93860744077920 --> 93860740301712
93860744073616 --> 93860744077920
93860744080896 --> 93860744073616
140589822947552 --> 93860744080896
/home/runner/work/mknodes/mknodes/mknodes/basenodes/mkdefinitionlist/metadata.toml
[metadata]
icon = "mdi:library"
name = "MkDefinitionList"
[requirements.extension.def_list]
[examples.regular]
title = "Regular"
jinja = """
{{ {"something": "A definition", "something_else": "Another\ndefinition"} | MkDefinitionList }}
"""
[examples.nested]
title = "Nested markdown"
jinja = """
{{ {"something": "A definition", "something_else": ("Nested" | MkAdmonition)} | MkDefinitionList }}
"""
[output.markdown]
template = """
{% for k, v in node.data.items() %}
{{ k }}
: {{ v | string | indent }}
{% endfor %}
"""
[output.rst]
template = """
{% for k, v in node.data.items() %}
{{ k }}
{{ v | string | indent(width=2) }}
{% endfor %}
"""